package cn.hbads.version.domain.version.persist;

import cn.hbads.version.domain.version.aggregate.DataVersion;
import cn.hbads.version.domain.version.aggregate.DataVersionChain;

import java.time.LocalDate;
import java.util.Optional;

/**
 * <b>数据版本链数据仓库</b>
 *
 * @author yvvb
 * @date 2025/5/5
 */
public interface IDataVersionRepository<T, E extends DataVersion<T>, C extends DataVersionChain<T, E>> {
    Optional<C> queryById(T id);

    Optional<E> queryVersionByIdAndVersionDateEq(T id, LocalDate versionDate);

    Optional<E> queryVersionByIdAndQueryDate(T id, LocalDate queryDate);

}
